﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<skags.Models.DisplayPageViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Model.Page.Title %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="navigation">
<ul>
<%
    foreach( var c in Model.Nav )
    {
        %>

        <li><a href="/Home/Page/<%=c.ID%>"><%=c.Title%></a>

        <ul>
        <%
        foreach( var s in c.SubPages )
        {
            %>
            <li><a href="/Home/Page/<%=s.ID%>"><%=s.Title%></a></li>
            <%
        }
        %>

        </ul></li>
        <%
    }
     %>
     </ul>
</div>
<div id="content">
    <h2><%= Model.Page.Title %></h2>

    <%= Model.Page.Text %>
</div>
</asp:Content>
